#include "../common.h"

const char empty = ' ';

void SerialService::prepare0(){
 	LOG_BEGIN(115200)
}
void SerialService::loop(){
	while (Serial.available()) {
			String cmd = Serial.readString();
			cmd.replace('\n', empty);
			cmd.replace('\r', empty);
			cmd.trim();
			TaskCtx<String>* ctx = new TaskCtx<String>(cmd);
			EventService::trigger(EVENT_SERIAL_MESSAGE, ctx);
		}
}
